<template>
    <div class="left-box">
        <div class="contetnt">
            <div class="name">{{ detail.shopName || '--' }}</div>
            <div class="address">地址：{{detail.shopAddress || '--'}}</div>
        </div>
        <div class="contetnt-bottom">
            <div class="title">
                商铺信息
            </div>
            <div class="copy-value" @dblclick="goCopyText(detail.shopId)">ID：{{ detail.shopId || '--' }}</div>
            <div class="copy-value" @dblclick="goCopyText(detail.poiId)">poiid：{{ detail.poiId || '--' }}</div>
            <div class="copy-value" @dblclick="goCopyText(detail.cityName)">地市：{{ detail.cityName || '--' }}</div>
            <div class="copy-value" @dblclick="goCopyText(detail.countyName)">区县：{{ detail.countyName || '--' }}</div>
            <div class="copy-value" @dblclick="goCopyText(detail.gridName)">网格：{{ detail.gridName || '--' }}</div>
            <div class="copy-value" v-if="detail.street" @dblclick="goCopyText(detail.street)">街道：{{ detail.street || '--' }}</div>
            <div class="copy-value" @dblclick="goCopyText(detail.shopOwn)">商铺归属：{{ detail.shopOwn || '--' }}</div>
        </div>
    </div>
</template>
<script>
export default {
    props:{
        detail:{
            type: Object,
            default:() => {}
        }
    },
    data() {
        return {
           
        }
    },
    methods: {
          goCopyText(text) {
            let input = document.createElement('input');
            input.value = text || this.copyText;
            document.body.appendChild(input);
            input.select();
            document.execCommand('copy');
            document.body.removeChild(input);
            this.copyRight = false
            this.$message({
                message: '复制成功',
                type: 'success'
            })
        },
        goBack() {
            this.$emit('goBack')
        },
        showPanel(){
            this.show = !this.show;
        }
    }
}
</script>
<style lang="scss" scoped>
.left-box {
    width: 350px!important;
    height: 100%;
    background: #fff;
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 1000;
}

.name {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
}

.back-btn {
    position: absolute;
    right: 16px;
    top: 8px;
}

.address {
    margin-top: 10px;
    line-height: 20px;
    font-size: 14px;
}

.contetnt {
    border-bottom: 8px solid #f0f1f3;
    padding: 20px;
}

.contetnt-bottom {
    padding: 20px;
    height: calc(100% - 100px);
    overflow-y: auto;
    .title {
        font-size: 16px;
        font-weight: bold;
        line-height: 24px;
        height: 24px;
        background: url('../../../assets/img/line.png') no-repeat;
        padding-left: 24px;
        margin-bottom: 5px;
    }
    .copy-value{
        line-height: 30px;
        font-size: 14px;
        padding-left: 24px;
    }
}

::v-deep .el-tag.el-tag--warning {
    background-color: #fff8e6;
    border-color: #fb9e4f;
    color: #fb9e4f;
}

::v-deep .el-tag--medium {
    height: 24px;
    line-height: 22px;
    font-size: 14px;
}
</style>